﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using EzDesk.DevHelper.DebugLibrary.Model;
using System.Xml.Linq;

namespace EzDesk.DevHelper.DebugLibrary
{
    public class EzDeskMessageInitial : EzDeskInitial, IEzDeskInitial
    {
        #region IEzDeskInitial Members

        void IEzDeskInitial.Initialize()
        {
            Debug.WriteLine("开始配置消息系统测试环境...");

            
            //清除消息数据库
            EzDeskMessageDataContext msgDb = new EzDeskMessageDataContext();


            msgDb.TopicSets.DeleteAllOnSubmit(msgDb.TopicSets);
            msgDb.MessageInboxSets.DeleteAllOnSubmit(msgDb.MessageInboxSets);
            msgDb.SingleMessageSets.DeleteAllOnSubmit(msgDb.SingleMessageSets);
            msgDb.SubmitChanges();
            Debug.WriteLine("消息数据库已经清除");


            Debug.WriteLine("消息发送模板已经更新");

            //添加消息发送的模板


        }

        void IEzDeskInitial.AddInitializeModule(IEzDeskInitial EzDeskMessageInitial)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
